package com.yjhb.android.sbz.mvp.contact

import com.yjhb.android.sbz.http.HttpObserver
import com.yjhb.android.sbz.http.HttpTool
import com.yjhb.android.sbz.mvp.ConventionPresenter2

class ContactUSPresenter(v:ContactUSView) :ConventionPresenter2<ContactUSView>(v){


    fun contact(type:Int){
        view?.onWait()
        model?.let {
            HttpTool.request(it.addSingleFriend(type),object : HttpObserver<String?>() {
                override fun onResult(data: String?) {
                    view?.onSuccess(data?:"")
                }

                override fun onError(code: Int, msg: String?) {
                    view.onFailure(code, msg)
                }
            })
        }
    }

}
